package com.wbw.csnd_hd.controller;

import com.wbw.csnd_hd.common.ResultCommon;
import com.wbw.csnd_hd.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/group")
@CrossOrigin(origins = "*")
public class GroupController {

    @Autowired
    GroupService groupService;

    /**
     * 统计当前组的已被使用的库位数，总库位数，剩余空位数
     * @param no 当前组的no
     * @return
     */
    @PostMapping("/statisticsGroup/{no}")
    public Map<String, Integer> statisticsGroup(@PathVariable String no){
        return groupService.statisticsGroup(no);
    }

}
